package com.dcy.znoa.domain.publiz;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("company")
public class Company {

    @TableId(type = IdType.AUTO, value = "comp_id")
    Long compId;

    @TableField("park_id")
    Long parkId;//park_id 园区ID

    @TableField("es_id")
    Long esId;//物业ID,物业的全称是estate,当comp_type为2 的时候此字段一般为空

    @TableField("comp_type")
    Integer compType;//企业类型：1 企业 2 物业，默认1，这样之前的接口就不用改了

    @TableField("comp_name")
    String compName;

    @TableField("contact")
    String contact;

    @TableField("contact_man")
    String contactMan;

    @TableField("district_code")
    String districtCode;

    @TableField("address")
    String address;

    @TableField("tyshxybm")
    String tyshxybm;//统一社会信用编码

    @TableField("zip_code")
    String zipCode;

    @TableField("website")
    String website;

    @TableField("create_oper_id")
    Long createOperId;

    @TableField("create_time")
    Date createTime;

    @TableField("update_oper_id")
    Long updateOperId;

    @TableField("update_time")
    Date updateTime;

    @TableField("valid_flag")
    Integer validFlag;

    @TableField(exist = false)
    private List<Department> departmentList;

    @TableField(exist = false)
    private String pcdName;//省市区名称组合，用 | 分隔

    public Company(String compName) {
        this.compName = compName;
    }
}
